שִׁבְעָה מִינֵי פֻרְעָנֻיּוֹת בָּאִין לָעוֹלָם עַל שִׁבְעָה גוּפֵי עֲבֵרָה. מִקְצָתָן מְעַשְּׂרִין וּמִקְצָתָן אֵינָן מְעַשְּׂרִין, רָעָב שֶׁל בַּצֹּרֶת בָּאָה, מִקְצָתָן רְעֵבִים וּמִקְצָתָן שְׂבֵעִים. גָּמְרוּ שֶׁלֹּא לְעַשֵּׂר, רָעָב שֶׁל מְהוּמָה וְשֶׁל בַּצֹּרֶת בָּאָה. וְשֶׁלֹּא לִטֹּל אֶת הַחַלָּה, רָעָב שֶׁל כְּלָיָה בָאָה. דֶּבֶר בָּא לָעוֹלָם עַל מִיתוֹת הָאֲמוּרוֹת בַּתּוֹרָה שֶׁלֹּא נִמְסְרוּ לְבֵית דִּין, וְעַל פֵּרוֹת שְׁבִיעִית. חֶרֶב בָּאָה לָעוֹלָם עַל עִנּוּי הַדִּין, וְעַל עִוּוּת הַדִּין, וְעַל הַמּוֹרִים בַּתּוֹרָה שֶׁלֹּא כַהֲלָכָה:
Seven (different) types of punishments come to the world for seven types of transgressions: If some (men) tithe and some do not tithe, a famine of dearth comes to the world. [Rain is scarce, as a result of which prices rise] — some are hungry and some are sated. If (all) resolved not to tithe, a famine of tumult [(The harvest cannot be gathered because of invading armies)] and dearth comes. If (they resolved) not to take challah, a famine of destruction comes. [The heavens are like iron and the earth like copper.] Pestilence comes to the world for the death penalties in the Torah, which did not come to [adjudication in ] the beth-din and for the fruits of the sabbatical year, [with which business was done and which were not kept in the sanctity of the sabbatical year.] A sword comes to the world for delay of judgment, [when it is known where the din inclines] and for perversion of justice, [vindicating the guilty and incriminating the innocent], and for ruling in Torah (law) not in accordance with the halachah, [forbidding the permitted, and permitting the forbidden].
Kli Yakar
Rabbeinu Bahya
The Midrash cites another possible reason for the ass being killed, namely to prevent the Emorites deifying an ass that was able to speak like a human being (Tanchuma Balak 9). A third reason is simply that the ass had performed the function it had been created for and kept in limbo since dusk on the sixth day of creation (Avot 5,8). We observe a similar phenomenon with the fish whose purpose on earth (in water) had been to swallow and subsequently spit out Jonah. We read in the Book of Jonah 2,2: “G’d appointed a large fish, דג גדול, to swallow Jonah.” The reason that fish was described as גדול “large,” is “great in years,” i.e.very old. Although there were many fish in the sea with bodies larger than that which swallowed Jonah, there was none that was as old, i.e. which had been assigned this particular task since the days of creation.The intention of the author of the Book of Jonah in writing the word וימן is to tell us that this fish and none other had been appointed for this specific task already during the dawn of history. This thought is also reflected in the word לבלוע, “in order to swallow,” instead of the simple ויבלע, “it swallowed,” when the Book of Jonah describes this fish. The peculiar wording alerts us to the fact that the sole purpose of G’d creating this fish when He did was to swallow Jonah. It is also peculiar that initially the fish is described as דג, fish (masculine) whereas in the course of the narrative the author changes to describe it as דגה, fish (feminine). Jonah is described as praying from the entrails of the דגה (Jonah 2,2) after he had first spent three days inside the דג. The term דגה repeatedly occurs as describing dead fish such as in Exodus 7,21 when the fish of the river Nile which had died due to the plague of blood are described as והדגה אשר ביאור מתו. [Perhaps the fact that the fish had died was the catalyst which caused Jonah to pray. Ed.]. When he said: מבטן שאול שועתי, “I have cried out from the belly of Sheol,” he meant that the fish had become his grave (Jonah 2,3).